package com.example.springboot.controller.api;

import com.example.springboot.common.Result;
import com.example.springboot.service.IBannersService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 轮播表 API控制器 - 不需要token验证的API
 * </p>
 *
 * @author
 */
@RestController
@RequestMapping("/api/banners")
public class BannersApi {
    @Resource
    private IBannersService iBannersService;

    //查询轮播图
    @GetMapping("/list")
    public Result list() {
        return Result.success(iBannersService.list());
    }
}
